package lhdx8;

//import  lhdx7.Pet;

public abstract class Pet {
    private String name;
    private String variety;
    private int weight;
    private int e;
    public Pet(String name,String variety,int weight,int e){
        this.name=name;
        this.variety=variety;
        this.weight=weight;
        this.e=e;
    }
    public void print(){
        System.out.println("这是一只叫"+name+"的宠物！");
        System.out.println("它的品种是："+variety+"，体重在；"+weight+"斤！"+"健康值："+e);
        System.out.println(name+"能吃能睡！");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getVariety() {
        return variety;
    }

    public void setVariety(String variety) {
        this.variety = variety;
    }

    public int getWeight() {
        return weight;
    }

    public void setWeight(int weight) {
        this.weight = weight;
    }

    public int getE() {
        return e;
    }

    public void setE(int e) {
        this.e = e;
    }
}
